Iterative memory cell charging based on reference cell value

ABSTRACT

Systems and methods, including computer software for writing to a memory device include applying charge to each of multiple memory cells for storage of a selected data value in each memory cell. The memory cells include a first reference memory cell, and each data value is selected from a group of possible data values. Each possible data value has a corresponding target voltage level, and the first reference memory cell has a corresponding predetermined first reference target voltage level. The voltage level in the first reference memory cell is detected. A determination is made whether the voltage level in the first reference memory cell is less than the first reference target voltage level. Additional charge is applied to the memory cells upon the determination that the voltage level in the first reference memory cell is less than the first reference target voltage.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of and claims priority toU.S. patent application Ser. No. 11/694,742 to Cornwell et al., entitled“Iterative Memory Cell Charging Based on Reference Cell Value,” andfiled Mar. 30, 2007 now U.S. Pat. No. 7,551,486, which claims priorityto U.S. Provisional patent application Ser. No. 60/800,357 to Cornwellet al., entitled “Systems and Methods for High Density Non-VolatileMemory,” and filed May 15, 2006, the contents of which are incorporatedherein by reference.

TECHNICAL FIELD

Various implementations may relate generally to non-volatile memorydevices, and particular implementations may relate to systems andmethods for operating multi-level flash cells.

BACKGROUND

As computing devices have increased in capabilities and features, demandfor data storage devices has grown. Data storage devices have been used,for example, to store program instructions (i.e., code) that may beexecuted by processors. Data storage devices have also been used tostore other types of data, including audio, image, and/or textinformation, for example. Recently, systems with data storage devicescapable of storing substantial data content (e.g., songs, music videos,etc.) have become widely available in portable devices.

Such portable devices include data storage devices (DSDs) that havesmall form factors and are capable of operating from portable powersources, such as batteries. Some DSDs in portable devices may providenon-volatile memory that is capable of retaining data when disconnectedfrom the power source. Portable devices have used various non-volatiledata storage devices, such as hard disc drives, EEPROM (electricallyerasable programmable read only memory), and flash memory.

Flash memory has become a widely used type of DSD. Flash memory mayprovide a non-volatile memory in portable electronic devices andconsumer applications, for example. Two types of flash memory are NORflash and NAND flash. NOR flash typically provides the capacity toexecute code in place, and is randomly accessible (i.e., like a RAM).NAND flash can typically erase data more quickly, access data in bursts(e.g., 512 byte chunks), and may provide more lifetime erase cycles thancomparable NOR flash. NAND flash may generally provide non-volatilestorage at a low cost per bit as a high-density file storage medium forconsumer devices, such as digital cameras and MP3 players, for example.

Typical flash memory stores a unit of information by storing anelectrical charge in each memory cell at a voltage representative of adigital data value. Single level cells store one bit of informationbased on the cell being charged to a “high” voltage, or being dischargedto a “low” voltage. NAND flash memory has been developed that stores upto two bits of information in a single cell by decoding the charge asbeing within one of four different voltage ranges. NOR flash memory hasbeen developed that can store up to 8 bits of information in a singlecell by decoding the charge as being within one of 256 different voltageranges.

SUMMARY

Described apparatus and associated systems, methods and computer programproducts relate to multi-level data storage in flash memory devices.

In one general aspect, writing to a memory device is performed byapplying charge to each of multiple memory cells for storage of aselected data value in each memory cell. The memory cells include afirst reference memory cell. Each data value is selected from a group ofpossible data values, and each possible data value has a correspondingtarget voltage level. The first reference memory cell has acorresponding predetermined first reference target voltage level. Thevoltage level in the first reference memory cell is detected, and adetermination is made whether the voltage level in the first referencememory cell is less than the first reference target voltage level.Additional charge is applied to the memory cells upon the determinationthat the voltage level in the first reference memory cell is less thanthe first reference target voltage.

Implementations may include one or more of the following features. Thefollowing operations are repeated until the voltage level in the firstreference memory cell is greater than or equal to the first referencetarget voltage level: detecting the voltage level in the first referencememory cell; determining whether the voltage level in the firstreference memory cell is less than the first reference target voltagelevel; and applying additional charge to the memory cells if the voltagelevel in the first reference memory cell is less than the firstreference target voltage level. The memory cells further include asecond reference cell having a second reference data value and acorresponding second reference maximum voltage level. The voltage levelin the second reference memory cell is detected, and a determination ismade whether the voltage level in the second reference memory cellexceeds the second reference maximum voltage level.

A determination is made whether the memory cells need to be rewrittenbased upon an error condition associated with the memory cells. The datain the memory cells is erased upon a determination that the memory cellsneed to be rewritten, and charge is reapplied to the erased memory cellsto charge each memory cell to the voltage level corresponding the datavalue desired for each memory cell. The memory cells further include athird reference cell having a third reference data value and acorresponding third reference maximum voltage level. The voltage levelin the third reference memory cell is detected, and a determination ismade whether the voltage level in the third reference memory cellexceeds the third reference maximum voltage level.

The charge is applied to the memory cells using a charge pump. Thevoltage level for each memory cell corresponds to a data valuecomprising more than 4 bits. The memory cells are contained within apage of memory cells and/or within a block of memory cells, and theblock of memory cells includes multiple pages of memory cells. The firstreference cell is segregated from the pages of memory cells. The memorycells are NAND flash memory cells.

In another general aspect, a memory device includes multiple memorycells. The memory cells include multiple data cells and one or morereference cells. A power source applies charge to the memory cells. Acell reader detects a voltage from the reference cell, and a controllercontrols application of charge from the power source to at least asubset of the data cells until the voltage of the reference cell reachesa target value.

Implementations may include one or more of the following features. Thememory cells are NAND flash memory cells. The memory cells furtherinclude a second reference cell for determining the success of a writeoperation. The second reference cell has a predetermined maximumvoltage, and the cell reader is adapted to read a voltage level from thesecond reference cell. A detector detects voltage levels in the memorycells, and a processor determines data values for each memory cell basedupon the detected voltage level and determines the success of a writeoperation. An analog-to-digital converter converts detected voltagelevels into digital representations of voltage levels, and the processoruses the digital representation to determine data values for each memorycell. A set of memory cells is associated with the group of memorycells. The set of memory cells is adapted to store metadata for use indetecting errors associated with a group of the memory cells. Theprocessor is further adapted to use the metadata to perform an errordetection test on the determined data values for each memory cell in theprocess of determining the success of the write operation.

In another general aspect, charge is applied to each of multiple memorycells to charge each memory cell to a voltage level that corresponds toa selected data value. The memory cells include a reference memory cell,and each data value is selected from a group of possible data values.Each possible data value has a corresponding target voltage level. Thefirst reference memory cell has a corresponding first reference datavalue and a corresponding first reference target voltage level. Thevoltage level in the first reference memory cell is detected, and adetermination is made whether the voltage level in the first referencememory cell is within a predetermined tolerance range from the firstreference target voltage level. Additional charge is applied to thememory cells if the voltage level in the first reference memory cell isnot within the predetermined tolerance range of the first referencetarget voltage.

Implementations may include one or more of the following features. Theoperation of determining whether the first reference memory cell iswithin a predetermined tolerance range from the first reference targetvoltage level is repeated and additional charge is applied to the memorycells until the first reference memory cell is equal to or greater thanthe first reference target voltage. A voltage level in a secondreference memory cell having a second reference cell predeterminedtolerance range is detected, and a determination is made whether thevoltage level in the second reference memory cell is not within thesecond reference cell predetermined tolerance range. An error correctiontest is performed on the memory cells. The memory cells are containedwithin a page of memory cells and/or within a block of memory cells. Theblock of memory cells includes multiple pages of memory cells, and thefirst reference cell is isolated from the pages of memory cells.

In yet another general aspect, charge is applied to each of multiplememory cells to charge each memory cell to a voltage level thatcorresponds to a selected data value. Each data value is selected from agroup of possible data values, and each possible data value has acorresponding target voltage level. A degree of accuracy for chargingthe plurality of memory cells is verified by detecting voltage levels inone or more reference memory cells associated with the memory cells.

Implementations may include one or more of the following features. Thedegree of accuracy is verified by determining whether a detected voltagelevel for one of the reference memory cells is within a predeterminedrange of voltages for that reference memory cell. The process ofverifying the degree of accuracy does not involve detecting voltagelevels from every memory cell.

Some implementations may provide one or more advantages. For example,some implementations may provide high performance data storagefunctions. Storage density and/or capacity may be increased. Someexamples may provide improved reliability and/or reduced data errorrates. Various implementations may permit increased levels ofintegration, miniaturization, reduced electromagnetic noise and/orimproved noise margins. Some implementations may realize lower systemcost in auxiliary systems, such as voltage supplies to logic and/orprogramming/erase circuits.

The details of one or more implementations of the invention are setforth in the accompanying drawings and the description below. Otherfeatures of the invention will be apparent from the description anddrawings, and from the claims.

DESCRIPTION OF DRAWINGS

FIG. 1 shows an example of an architecture of a multi-chip package thatincludes a NAND flash memory die and a flash disk controller.

FIGS. 2A-2B collectively show a mapping between a cell voltages anddigital values stored in a memory cell.

FIGS. 3A-3B show flow charts that illustrate examples of processes forreading pages of data from a multi-level cell flash memory.

FIG. 4 shows a flow chart that illustrates an example of a process forreading a page of data from flash memory.

FIG. 5 shows a flow chart that illustrates an example of a process forperforming error correction operations to correct a page of datacontaining bit errors.

FIGS. 6A-6C collectively show examples of operations for executing analternative value command.

FIGS. 7A-7B show flow charts that illustrates an examples of processesfor writing data to a flash memory page.

FIGS. 8A-8B show flow charts illustrating examples of processes foradjusting cell resolution of a memory page.

FIG. 9 shows a flow chart illustrating an example of a maintenanceprocess.

FIG. 10 shows a flow chart illustrating an example of a process oflogical addressing in the flash disk controller.

FIG. 11 shows an example of a system that includes a charge pump and ananalog to digital converter external to the NAND flash memory die.

FIG. 12 shows an example of a system that includes decoupled power inputat a NAND flash memory die.

Like reference symbols in the various drawings indicate like elements.

DETAILED DESCRIPTION OF ILLUSTRATIVE EXAMPLES

Various implementations relate to flash memory capable of storinginformation in deep multi-level cells (MLCs). Deep multi-level cells mayencode at least several bits of data according to a cell voltage. Someimplementations relate to architectures for implementing systems thatinclude deep MLC flash memory. Some implementations relate to techniquesfor performing data storage operations with deep MLC flash memory.

FIG. 1 shows an example of a multi-chip package (MCP) 100 that providesdata storage for a host device (not shown). The MCP 100 includes a NANDflash memory die 103 for storing data and a flash disk controller (FDC)106 that facilitates access to the flash memory in response to readand/or write commands from the host. In some implementations, the NANDflash memory die 103 stores data in deep MLCs. For example, cells in theflash memory die 103 may hold 3, 4, 5, 6, 7, 8, 9, 10 or more bits ofinformation. The MCP 100 may provide data storage in various portabledevices, such as digital cameras, other image storing devices, portableaudio devices, personal digital assistants (PDA), and digital videorecorders, for example. Some implementations may also be used in otherapplications, examples of which may include desktop computers, servers,wireless routers, or embedded applications (e.g., automotive),particularly in situations where quick access to data is desirable. Ingeneral, apparatus and techniques according to examples described hereinmay be implemented to increase flash memory density and/or to realizehigh performance and/or reliable non-volatile data storage operations.

As an illustrative example, the MCP 100 may store a data file by storinga byte (i.e., 8 bits) of information in each cell in a group of cells(e.g., a page or a block) in a flash memory. Some other examples mayhave resolutions such as 16-bit, 32-bit, 64-bit, or more. In someimplementations, resolution may be determined by single or multipleelectron detection on a gate of a cell. In other implementations, anypractical number of bits of information may be encoded in a voltage towhich an individual flash memory cell is charged.

The FDC 106 includes a host interface 109, a processor 112, and a flashinterface 115. The FDC 106 receives commands and/or data (e.g., softwarecode updates or user data) from and/or transmits data to a host device,such as a processor on a desktop computer, server, or portable computingdevice, via the host interface 109. Communication with the host may usecustom or standard protocols, such as Advanced Technology Attachment(ATA), Serial ATA (SATA), Block Abstracted NAND, Secure Digital (SD), orMulti-Media Card (MMC), for example. In some implementations, the MCP100 may be part of the same product as the host device. In otherimplementations, the host device may be in operative communication withthe MCP 100 through a communication link (e.g., USB, Firewire,Bluetooth) to at least one other processor-based device. For example, ahost may access the MCP 100 remotely by sending control messages andsending and receiving data messages over at least one network, which mayinclude wired, wireless, or fiber optic links, or a combination ofthese. Such networks may support packet-based communications, and mayinclude a local network or a wide area network, such as the Internet.

The processor on the host device may read data from and/or write data tothe NAND flash memory die 103 using a logical addressing scheme that isprocessed by the FDC 106 to identify physical addresses in the flashmemory. In some implementations, the host interface 109 may beconfigured to communicate with the host device using an ATA/IDEinterface. The processor 112 may process the received command and usethe flash interface 115 to access the NAND flash memory die 103. The FDC106 may be configured to provide functionalities, such as wearmanagement, block management, error correction, and logical addressingmanagement functionalities, to improve performance of the NAND flashmemory die 103, such as increasing reliability, decreasing read andwrite time, improving power efficiency, and increasing capacity per chipvolume. Certain techniques and apparatus described herein may beapplicable to NAND and/or NOR flash memory, to other types ofelectrically erasable or electrically writable memory, or to memory inwhich data access resolution is in pages or blocks.

Although only one NAND flash memory die 103 is shown in FIG. 1, the MCP100 may include more than one NAND flash memory die 103. Someimplementations may include any combination of non-volatile memories,which may include NAND flash, NOR flash, or electrically erasableprogrammable read only memory (EEPROM). In some illustrative examples,the MCP 100 can include two, three, four, or at least eight NAND flashmemory dies 103. For example, the MCP 100 may include a flash diskcontroller 106 on a die that is packaged with (e.g., in a stack) fourNAND flash memory dies 103.

In some implementations, the flash disk controller 106 and the flashmemory die 103 may be implemented on a single die. In otherimplementations, one or more of the components in the flash diskcontroller 106 may be implemented in part or entirely external to asingle die or the MCP 100. For example, some or all of the synchronousdynamic random access memory (SDRAM) 151 and/or the non-volatile memory(NVM) 154 may be implemented external to the MCP 100. In someimplementations, some or all of the flash disk controller 106 may bepackaged separately from the flash memory die 103. In an illustrativeexample, the NVM 154, the SDRAM 151, the host interface 109, and atleast a portion of the processor 112 may each be implemented externallyto the MCP 100. In other implementations, the analog and/or digitalsignals between the flash interface 115 and the flash memory die 103 maybe externally routed to an integrated package.

Remote or distributed transmission structures (e.g., shielded and/orcontrolled impedance signal paths) may be implemented to transportsignals to and/or from at least one flash memory die 103. In someimplementations, memory expansion may be provided by installingadditional packages of non-volatile memory. Buffering and/or routingdevices may be used to support distribution of analog and/or digitalsignals to a variable number of memory dies 103. Furthermore, functionsof the processor 112 may be performed external to the MCP 100. Invarious examples, the processor 112 may be implemented, in whole or inpart, in a circuit on the same substrate (e.g., printed circuit board)or in the same product as the MCP 100. The processor 112 may beimplemented from another computing device in operative communicationwith the MCP 100 through a communication link (e.g., wired, wireless,fiber optic, or a combination of any of these).

The MCP 100 may have any practical memory size, such as up to at least100 gigabytes or more. In the depicted example, the NAND flash memorydie 103 is organized to include a number of flash memory blocks 118. Insome implementations, the NAND flash memory die 103 may include hundredsor thousands of flash memory blocks 118. Each flash memory block 118includes a number of flash memory pages 121. As shown, each flash memorypage 121 includes cells that may store data 124 and cells that may storeerror correction codes (ECCs) 127 associated with the data. As anexample, the flash memory page 121 may store 2048 bytes of data and 64bytes of ECC data. The data cells 124 store information received fromthe flash disk controller 106. The ECC cells 127 store additionalintegrity meta-data (e.g., ECC data) that is associated with the datastored in the data cells 124. In various implementations, the ECC dataallows the flash disk controller 106 to detect and/or correct bit errorsin the data.

In the illustrated example, each flash memory block 118 also includesone or more reference cells 130 a, 130 b, 130 c. In someimplementations, the FDC 106 may monitor the voltage in the referencecells 130 a, 130 b, 130 c to estimate the degree of voltage sag ordrift, in the cells 124, 127. In each block 118, the reference cell 130a may be located at the beginning of the block 118, and the referencecell 130 b may be located at the end of the block 118. Each flash memorypage 121 may include the reference cell 130 c. In some implementations,a greater or lesser number of reference cells may be distributed in anypattern across the pages, blocks, and dies of the memory 103 todetermine the likely performance of the cells 124, 127.

In some implementations, reference cells may be located in or aroundcells that experience read/write usage levels that are representative ofthe usage level of certain data cells of interest. Compensation methodsmay be based on comparing non-reference cells to other non-referencecells. For example, if voltages in a number of cells in the same page orblock are relatively low, then compensation may include adjustingthresholds (e.g., voltage thresholds between different value levels in acell) downward according to the measured values so that read errors maybe substantially reduced. Other examples include determining acorrection function based upon the detected voltages in reference cells,the correction function adjusting the detected voltage prior toconverting the detected voltage into the digital data value representedby the memory cell.

In some implementations, memory cells may be refreshed by applyingadditional charge to a plurality of cells to correct for detectedvoltage sag. For example, if the voltage level of one or more referencecells indicate more than some threshold amount of voltage drift, thenthe memory cells in the page(s) or block(s) associated with thereference cell(s) may be either adjusted by applying additional chargeor rewritten to restored the cells to appropriate voltage levelsaccording to the stored data. Such adjustments can be performedimmediately upon detecting the voltage drift in the reference cell (s)or as part of a later maintenance operation. In some implementations,additional charge may be applied or the memory cells may be rewrittenbased on the difference between the detected reference cell voltage(s)and the target reference cell voltage(s), which may be assumed toindicate the approximate amount of voltage drift or sag for both thereference cell(s) and the corresponding data cells.

In other implementations, applying additional charge or rewriting of thememory cells may be performed by reading all of the cells, performingany necessary adjustments to thresholds (e.g., using a correctionfunction based on the reference cell voltages and/or using othertechniques described herein), and performing error correction on thedetected data to obtain the stored data. Thereafter, the data can beused to determine appropriate voltage levels or how much additionalcharge is needed for the various memory cells to correct for theidentified voltage drift or sag. In some implementations, the amount ofadditional charge applied may be determined based on a correctionfunction that is the same or similar to the correction function used toadjust detected voltages prior to converting the detected voltages intodigital data values.

In some implementations, cells in the flash memory may be adaptivelyre-assigned. For example, reference cells may be added, removed,relocated, and/or redistributed as needed in response to read or writeusage information, temperature, product age, supply voltage (e.g., lowbattery, AC-line powered), and/or detected error levels. If errors incertain blocks or pages of memory are low, then fewer cells may beassigned as ECC cells 127 and/or reference cells 130, which allows formore data cells 124. The relative assignments of cells to reference,data, and ECC functions, as well as the resolution of individual cells,may be dynamically adjusted based on current operating conditions,and/or according to predetermined conditions. For example, theresolution may be adjusted based on error rates, the number of ECC cellsper page may be based on error rates and read and write historyinformation, and the location and distribution of reference cells may bebased on error rate and product age. This example merely illustratesthat the controller 106 and the flash memory die may be dynamicallyadjusted according to various criteria. Other criteria may includecriticality of the data, power source availability (e.g., AC line power,battery power), and defined criteria about the relative importance ofmaximizing memory size, speed performance, and data integrity. Forexample, maintaining a high cell resolution that requires a substantialnumber of software corrections may result in longer access times. Thecriteria may be tailored by the user, product manufacturer, or software,according to the needs of the application.

In some implementations, data that requires a substantial number ofsoftware corrections may be rewritten in a maintenance operation tocorrect for variations in charge associated with the passage of time orto correct for pages of memory cells that have begun to degrade.Typically, when changing the resolution of one or more memory cells, thedata will be written to a different page of memory cells, and may bewritten at the same or a different resolution. In some implementations,the original page of memory cells will be downgraded to a lowerresolution, which will often be required as the memory cells age anddegrade. When rewriting of data is performed as a result of identifiedvoltage drift or sag, it is possible to write the data to the same or adifferent page or block of memory cells.

The flash interface 115 provides direct control, handshaking, and datatransfer access to the flash memory die 103. The flash interface 115includes a control interface 133 and an analog interface 136. In someimplementations, the control interface 133 may send control, address,and data signals to the flash memory die 103. The commands and thememory addresses may be transmitted in digital signals or analogsignals. The flash disk controller 106 can also receive analog signalsfrom the flash memory die 103. The flash disk controller 106 may includea processor for interfacing with flash memory logic on the flash memorydie 103, and this processor for interfacing with the flash memory logicon the flash die may be integrated into the flash interface 115.

In response to a read command, the flash memory die 103 may output cellvoltages representing data stored in individual data cells 124. Theflash disk controller 106 can receive the analog voltage signals outputfrom each memory cell on the flash memory die 103. These analog cellvoltages or analog voltage signals may be transmitted to the analoginterface 136 in the FDC 106. In some implementations, the flashinterface 115 may also include a data bus separate from the controlinterface 133 and analog interface 136 for communicating with the flashmemory die 103.

The analog interface 136 may include an analog front end (analog FE) 139and an analog-to-digital converter (ADC) 142. Upon receiving the analogsignals, the analog FE 139 may condition the signals as needed, forexample, to provide offset, corrective level shift, gain, buffering,filtering, or controlled impedance to minimize reflections. The analogFE may provide a high impedance input to minimize loading of the flashmemory cell, and a low impedance output to drive a sample and hold ortrack and hold circuit that is coupled to an input of the ADC 142. Insome implementations, the analog FE 139 may further include an analogmultiplexer (not shown) to select one of a number of analog output linesfrom one or more flash memory dies.

The ADC 142 processes the analog value to determine a correspondingdigital data value representation of the voltage in the data cells 124,127. The ADC 142 receives the conditioned analog signal and convert theanalog signal into a digital representation of the analog voltage. TheADC 142 (or a processor in the ADC) then converts the digitalrepresentation into a digital data value represented by the voltagestored on the memory cell based on, for example, a mapping function. Theprocessor 112 could also be used to convert the digital representationinto a digital data value. The digital representation of the analogvoltage may include enough information to allow the ADC 142 or aprocessor to distinguish among a plurality of analog voltage levels eachrepresenting a particular digital data value. The digital representationmay comprise a greater number of bits of data than the digital datavalue. In some implementations, the ADC 142 may be integrated into theflash memory die 103 rather than being included in the flash diskcontroller 106. In such a case, the flash interface 115 may receivedigital representations of cell voltages or digital data values from theflash memory die 103.

An example of a mapping function 145 is shown. Based on the mappingfunction 145, the ADC 142 or the processor 112 may convert an analogcell voltage into digital representation and/or a digital data value.For example, there may be a series of analog voltage thresholds that canbe used to map an analog voltage to a digital representation and/ordigital data value. Likewise, the mapping function 145 may alsoillustrate the conversion of a digital representation of the analogvoltage into a digital data value. For example, one or more digitalrepresentations of the analog voltage may map to a particular digitaldata value, with each digital data value having a corresponding distinctset of one or more digital representations.

In some implementations, the ADC 142 or the processor 112 may receiveparameters that change the mapping function 145. For example, the FDC106 may adapt the mapping function 145 based on current temperature,supply voltage, number of reads and write of the page data, and/or thevoltage in the reference cells 130 a, 130 b, and/or 130 c. In someimplementations, adaptations to the mapping function may be based onvoltage characteristics of neighboring data cells 124, ECC cells 127,and/or other cells. The mapping 145 between cell voltages and digitaldata values is described in further detail with reference to FIGS.2A-2B. In some implementations, the ADC 142 or a processor may alsooperate responsive to an alternative value command to retrievealternative values for the received analog signals or digitalrepresentations of the analog signals. Example implementations of thealternative value command are described in further detail with referenceto FIGS. 6A-6C.

The flash disk controller 106 also includes an ECC engine 148. Invarious implementations, the ECC engine 148 may perform hardware and/orsoftware error checking and correction using ECC cells 127. In someimplementations, the ECC engine 148 may provide state machine-based datarecovery. For example, the ECC engine 148 may detect the number of errorbits in a page of data. Then, the ECC engine 148 may determine which ECCalgorithm is used. As an example, the ECC engine 148 may be configuredto first attempt a hardware ECC algorithm using, for example, Hamming orReed-Solomon codes. If the hardware ECC algorithm is unsuccessful inrecovering the page of data, then a software ECC correction may beattempted. An example method illustrating use of hardware ECC, softwareECC, and other techniques in combination is described with reference toFIG. 5. In some implementations, the ECC engine 148 may provide errorcorrection for up to at least about 10% or more of the size of a page ofdata. In some examples, a processor may determine which ECC algorithm touse.

In some implementations, the processor 112 will rewrite or refresh thedata stored in a flash memory page if an ECC algorithm is used torecover data that includes more than some predetermined number orpercentage of errors. In other implementations, the processor 112 willrecord the location, physical and/or logical, of data that included sucherrors in a maintenance log. The processor 112 will then rewrite orrefresh that data during a maintenance operation (See FIG. 9).Maintenance operations may be performed when the host device isoperating under a predetermined power condition, when the processor 112has a predetermined amount of excess bandwidth, and/or at scheduledintervals.

The flash disk controller (FDC) 106 may include dynamic random accessmemory (DRAM). The flash disk controller 106 of this example alsoincludes a synchronous dynamic random access memory (SDRAM) 151. Forexample, the SDRAM 151 may be a single data rate SDRAM or a double datarate SDRAM. In some implementations, the FDC 106 may use the SDRAM 151as a high speed and high density buffer for storing temporary data suchas output data for the host device and alternative digital values for apage of data, for example. FDC 106 may also include other types of RAM,such as DRAM. As an example, the FDC 106 may receive analog data fromthe NAND flash memory die 103.

The FDC 106 may then convert detected analog voltages into digital data,including, in some cases, alternative digital data values for one ormore of the cells. Then the ECC engine 148 checks and corrects thedigital data, possibly checking multiple different combinations of datavalues and alternative data values for the cells on each flash memorypage 121. If the error correction is successful, then the processor 112may store the digital data into a host output buffer in the SDRAM 151.In some implementations, the host device may retrieve data from the hostoutput buffer. Alternatively, the flash disk controller 106 may forwarddata from the host output buffer to the host device. The SDRAM 151, orother cache memory, may further be used to store data to be written tothe flash memory die 103.

The FDC 106 also includes a non-volatile memory (NVM) 154. In thisexample, the NVM 154 includes wear management software code 157, blockmanagement software code 160, logical addressing software code 163, andcell resolution registers 166, each of which contain instructions (orpointers to instructions in the flash memory) that, when executed by theprocessor 112, perform certain operations. In some implementations, theNVM 154 may be separate from the NAND flash memory die 103. For example,the NVM 154 may be a NOR flash memory or another NAND flash memory. Inother implementations, the NVM 154 may be one or more pages in the NANDflash memory die 103. In other implementations, the NVM 154 may storepointers or memory locations to the data stored in the NAND flash memorydie 103. In some implementations, the processor 112 may execute the wearmanagement software code 157, the block management software code 160,and the logical addressing software code 163 to improve efficiency,performance, and/or reliability of the MCP 100.

The processor 112 may use the wear management software code 157 tomanage the wear of pages 121, blocks 118, or die 103 in the MCP 100. Forexample, the wear management software code 157 may include instructionsthat, when executed by the processor 112, perform operations thatinclude load balancing operations to swap the data in the mostfrequently used memory page to a less used memory page. The swappingoperations may also include an updating of the logical addressingsoftware code 163.

The wear management software code 157 may be activated during amaintenance operation. In some implementations, the physical and/orlogical addresses of each read operation is recorded in a maintenancelog. Each write operation may also be recorded in a maintenance log. Thewear management software code 157 may then use predetermined thresholdvalues for determining how to rearrange stored data among the pages ofmemory cells. These threshold values, for example, might include 100 or1000 reads of the page of memory cells during the course of a week ormonth. In other implementations, the threshold values might be basedupon a percentage of the total number of read operations, or based upondeviation from the average number of reads per page per time. An exampleof a maintenance operation is depicted in FIG. 9.

The block management software code 160 may include code for managing badblocks in the flash memory die 103. For example, the block managementsoftware code 160 may include historical error information about theflash memory blocks 118. In some implementations, the error informationmay be used to maintain the cell resolution in each of the flash memorypages. An example of the block management software code is described infurther detail with reference to FIGS. 8A and 8B.

The block management software code 160, possibly in conjunction with thelogical addressing software code 163 and/or the cell resolutionregisters 166, may also be used to pair sets of bad blocks or bad pageshaving reduced resolutions (updated in the cell resolution registers166) in the flash memory die 103 and have the set of bad blocks or badpages be treated for logical addressing purposes (perhaps updated in thelogical addressing software code 163 and/or the cell resolutionregisters 166) as equivalent to a single block or single page of memorycells having the initial higher resolution. The block managementsoftware code 157 may be activated during a maintenance operation. Anexample of a maintenance operation is depicted in FIG. 9.

The logical addressing software code 163 may include code to convert alogical address in a host command to physical addresses in the NANDflash memory die 103. In some examples, a logical page may be associatedwith multiple physical memory pages in the NAND flash memory die 103.The logical addressing software code 163 manages the conversion andupdate of the logical address table in the NVM 154. In an example, thelogical addressing software code 163 may dynamically maintain linksbetween logical block addresses from the host and physical pageaddresses as the pages are downgraded from 10 bit resolution to 8 bitresolution, for instance, or as the mapping of logical block addressesto different physical page addresses are changed for purposes of wearmanagement. Intermediate forms of addresses may be generated in theprocess of converting between logical and physical addresses, forexample. Intermediate address forms may be generated, processed, stored,used, and/or otherwise manipulated to perform various non-volatilememory operations. An example of the logical addressing software code isdescribed in further detail with reference to FIG. 10.

The cell resolution registers 166 store information about cellresolution in each flash memory page 121. For example, the NAND flashmemory die 103 may be an 8-bit MLC flash memory. In someimplementations, some of the flash memory block 118 may be downgraded orup-graded in response to various conditions. Illustrative examples ofsuch conditions include error performance, temperature, voltageconditions, number of read or write cycles of individual cells, groupsof cells, pages, cells in a neighboring location, reference cells, cellswith comparable read and/or write usage history, or other factors, suchas age of the device. Information about some or all of these conditionsmay be stored in a data storage device, or determined or estimated fromone or more other bits of stored information. In one example, storedinformation may include historical read and write usage data thatrepresents usage levels for at least some of the cells in the memory die103. The processor 112 may update the cell resolution registers 166 toreduce a cell resolution of a down-graded memory page to, for example,4-bit, so that the flash memory page 121 may still be usable with asmaller memory size. In other implementations, the cell resolutionregisters 166 may also store the cell resolution for each flash memoryblock 118.

In some implementations, the cell resolution registers 166 aredownwardly adjusted to a single bit resolution or another low number bitresolution prior to transferring data from a host device to memory cellsin the MCP 100. This process is depicted in further detail in FIG. 7B.Lowering of the cell resolution registers 166 prior to transferring datamay allow for faster data transfer rates because less precision isneeded in charging each memory cell. The transferred data maysubsequently be rewritten to memory cells at a higher resolution. Insome implementations, the transferred data may be rewritten at a higherresolution during a maintenance operation (e.g., during a later timewhen sufficient processing resources are available and the rewritingdoes not interfere with other reading or writing operations). In someimplementations, a record of the low cell resolution data transfer ismade in a maintenance log.

In some implementations, the logical addressing software code 163, theresolution registers 166, and/or the block management software code 160will group down-graded memory pages (or down-graded memory blocks)together and treat the group for logical addressing purposes as a singlenon-down-graded memory page (or block). The memory pages of the group ofdown-graded memory pages do not need to be adjacent memory pages. Thegroup of down-graded memory pages can include memory pages fromdifferent blocks and even from different memory dies. In someimplementations, each down-graded memory page or block in a group ofdown-graded memory pages or blocks is down-graded in response to anerror condition associated with the page or block.

FIGS. 2A-2B collectively show mappings between cell voltages and digitaldata values stored in the memory cell. As shown in FIG. 2A, anillustrative digital data value distribution 200 of an 8-bit memory cellis shown. An 8-bit memory cell would include 256 possible digital datavalues; a 4-bit memory cell would include 16 possible data values. Thenumber of possible data values is equal to 2^(n) (where n equals thenumber of bits), but the number of possible digital data values need notcorrespond to an n-bit number of possible digital data values. Eachmemory cell could have any integer number of possible digital datavalues greater than 1, for example, some memory cells could have 10possible data values. The digital value distribution 200 includesdigital value distribution curves 205-210 that represent the voltagedistribution for each digital data value. Each digital valuedistribution curve (e.g., 205-210) represents a range of digital voltagevalues corresponding to voltage levels associated with each possibledigital data value.

During a write operation, each memory cell receives a charge to ananalog voltage corresponding to a digital data value selected from oneof the possible digital data values. This corresponding voltagetypically falls within the distribution curves 205-210 for the desireddigital data value. This corresponding voltage could also be a targetvoltage corresponding to the digital data value. For example, if a cellvoltage lies within the distribution 207, then the digital value storedin the cell may be 02_(H). During a read operation, an analog voltagesignal is detected from each cell. The ADC 136 then converts the analogvoltage signal into a digital representation of the analog voltagesignal. This digital representation is then compared with at least onedigital value distribution curve to determine the digital data valuerepresented by the analog voltage stored in the read memory cell.

The digital data value distribution 200 includes grey areas 215 betweenthe digital data value distribution curves 205-210. In someimplementations, when the ADC 142 receives a cell voltage or detects ananalog voltage signal that lies within one of the grey areas 215, theADC 142 may, for example, convert the cell voltage to the nearestadjacent digital data value. For example, if the ADC 142 receives a cellvoltage substantially near a voltage level 220, then the ADC 142 mayresolve to the nearest adjacent digital data value, namely FE_(H). Insome implementations, the FDC 106 may also include an alternative valuecommand that instructs the ADC 142 to resolve to an alternative valueother than the nearest adjacent value based on some parameters.

In some implementations, the FDC 106 may use both the nearest adjacentdigital data value and one or more alternative values in an errorcorrection process that attempts to resolve a page or block of datavalues. Furthermore, the FDC 106 may assign an uncertainty to particularcell voltages or corresponding data values based on the location of thecell voltage within the digital data value distribution curves 205-210or the grey areas 215. The assigned uncertainty may be used by analgorithm that attempts to resolve a page or block of data values. Someexamples of these parameters may include one or more of temperature,number of reads to the cell, number of writes to the cell, supplyvoltage, and voltage in the reference cells 130 a, 130 b, 130 c. In someexamples, the cell voltage may drop below a minimum cell voltage (Vmin).The FDC 106 may implement a correction by adding an offset to thereceived cell voltage. This offset may be added by either the analog FE139 or added digitally by either the ADC 142 or the processor 112.

In some implementations, the FDC 106 may dynamically adjust locationsand the widths of the grey areas 215 by altering the digital data valuedistribution 200. For example, the FDC 106 may include maintenancesoftware code that adjusts the grey areas 215 based on parameters suchas one or more reference cell voltages, the usage of the memory cell,and other heuristics that may be preloaded in the NVM 154. Themaintenance software code may also perform updating of the cellresolution registers 166. For example, each die 103, analog interface135, and/or MCP 100 may be characterized at manufacturing time and alinearization table, correction factors, or other corrective adjustmentmay be stored in non-volatile memory in the MCP 100. In some cases, themaximum and minimum voltage levels (Vmax and Vmin) as well as thedigital value distribution curves 205-210 may be adjusted and/orredistributed based on empirical testing of the cells during theirlifetime of use.

As shown in FIG. 2B, a cell voltage to digital value graph 250 is shown.The graph 250 includes an ideal voltage characteristic 255 that the ADC142 uses to convert analog voltages to digital values. In some examples,the data cell 124 may store digital values according to non-idealvoltage characteristics 260, 265 due to, for example, the heuristics oftemperature, age of the cell, charge pump or supply voltage tolerances,non-linearity of the ADC 136, detected errors in the memory cell, and/orthe number of reads and writes of the cell. The FDC 106 may compensatein various ways for the voltage characteristics 260, 265 to be closer tothe ideal characteristics 255. Example compensation methods aredescribed with reference to FIGS. 3-6.

FIGS. 3A and 3B show flow charts that illustrate examples of processes350 and 300 for reading a page of data from a NAND flash memory. Theprocesses 350 and 300 include operations that may be performed generallyby the processor 112. In some implementations, the processes 350 and 300may also be performed, supplemented, or augmented by other processingand/or control elements that may be incorporated with the ADC 142. Forexample, there may be a controller or compensator in the analoginterface 136 that performs some or all of the operations in theprocesses 350 and 300.

FIG. 3A depicts a process of converting detected voltage levels frommulti-level memory cells into digital data values. The process 350begins with detecting an analog voltage level from a multi-level memorycell (step 355). This voltage may be detected by the analog interface136, for example. The analog interface 136 may include an input operableto receive analog signals from a flash memory die 103. The flash diskcontroller 106 may further include a control module to select memorycells from which the input receives analog signals. In step 360, theanalog voltage signal is converted into a digital representation of thedetected analog voltage. This conversion may be performed by the ADC142. The digital representation may have sufficient data to allow forthe ADC 142 or the processor 112 to distinguish the level of the analogvoltage stored by a memory cell among a plurality of possible voltagelevels representing a digital data value. This may be accomplished byhaving a digital representation comprising more bits of data than thedigital data value represented by the voltage stored on the memory cell.

FIG. 2A helps illustrate this concept. The range of possible analog cellvoltages may be segregated into multiple segments (e.g., such asrepresented by voltage level 220) that each correspond to a digitalrepresentation of the analog cell voltage. Each digital valuedistribution curve 205-210 and each grey area 215 may include multiplesuch segments, allowing for the use of digital representations having ahigher resolution than the digital value distribution curves 205-210,which can provide additional information relating to, for example, wherea cell voltage lies within a digital value distribution curve 205-210 ora grey area 215.

In step 365, the digital representation is converted into a digital datavalue based upon a digital data value distribution. The digital datavalue distribution may be stored in the cell resolution registers 166and may be the digital data value distribution 200 shown in FIG. 2A. Instep 335, a processor or controller determines whether there are morememory cells to read. If so, then the process returns to step 355.Otherwise, process 350 ends.

FIG. 3B depicts in greater detail a process of storing identifieddigital data values and marking the location of uncertain digital datavalues. The process 300 begins when, for example, the processor 112receives a command to retrieve a page of data from the NAND flash memorydie 103. In step 305, the processor 112 retrieves cell resolutioninformation for a page from the cell resolution registers 166. Then, instep 310, the processor 112 receives from the ADC 142 a digital outputvalue for a data cell. The digital output value for the data cell is adigital representation of the voltage detected from the data cell. TheADC 142 determines the received digital data value based on storedthresholds in step 310. In some implementations, the processor 112 mayuse information in the cell resolution registers 166 to determine whichset of thresholds are used. These thresholds may relate to the digitalvalue distribution curves 205-210 discussed above in regard to FIG. 2A.For example, the processor 112 may use one set of thresholds for an8-bit cell and another set of thresholds for a 2-bit cell. In somecases, the processor 112 may use one set of thresholds for one 8-bitcell and another set of thresholds for a different 8-bit cell. Each setof thresholds may correspond to a possible digital data valuedistribution and may constitute ranges of digital representations ofanalog voltages that correspond to possible digital data values.

In step 320, the processor 112 determines whether the digital datavalues for a received analog voltage values are uncertain. In someimplementations, the processor 112 may determine that a digital datavalue is uncertain if the cell voltage lies in a grey zone 215 of thedigital value distribution 200 or if the cell voltage is near theboundary between a digital value distribution curve 205-210 and a greyzone 215. In some implementations, different levels of uncertainty canbe assigned depending on where the cell voltage falls within the digitalvalue distribution 200 (e.g., higher voltages may tend to have greateruncertainty and/or uncertainty may be higher for cell voltages that arecloser to the middle of a grey zone 215). In step 320, if the processor112 determines that the received digital values are not uncertain, thenthe processor 112 stores the received digital value in a host outputbuffer in step 325. If the processor 112 determines that the receiveddigital value is uncertain in step 320, then the processor 112 may markthe location of the uncertain digital value in a mask table in step 330,and then executes step 325. In some implementations, one or morealternative values may also be stored for subsequent use in resolvingwhich value (e.g., the uncertain value or one of the alternative values)is correct.

After the processor 112 stores the received digital value, the processor112 determines, in step 335, whether there are more cells to read. Forexample, the processor 112 may check whether the end of the memory pageis reached. If there are more cells to read, then the process returns tostep 310. If there are no more cells to read, the process 300 ends. Insome implementations, the process will also record the number ofuncertain data values associated with a page or block of memory cells ina maintenance log. In other implementations, the process will record thelocation, physical and/or logical, of a page and/or block of memorycells if the number of uncertain data values exceeds a predeterminedthreshold.

FIG. 4 shows a flow chart that illustrates an example of a process 400for reading a page of data from an MLC flash memory, such as the NANDflash memory die 103, using a correction function to adjust mapping ofthe cell voltages to the digital values. The process 400 may beperformed by the processor 112, for example. The process 400 begins instep 405 when the processor 112 determines whether a read command isreceived. For example, the FDC 106 may receive a read command from thehost device through the host interface 109. If, in step 405, theprocessor 112 determines that no read command is received, then step 405is repeated.

If the processor 112 determines that a read command is received in step405, then the processor 112 updates a correction function in step 410based on temperature, number of reads or writes in the memory page,supplied voltage, and/or other operating conditions of the NAND flashmemory die 103. In some implementations, the ADC 142 or the analoginterface 136 may use the correction function to adjust measured cellvoltages at the analog front end 139 before the cell voltages areconverted into digital values. In other implementations, the processor112 may use the correction function to adjust the thresholds in themapping function, so the ADC 142 may convert analog voltage intoadjusted digital values. The correction function can be different fordifferent cells. For example, memory cells having higher detectedvoltages can have a greater adjustment due to the correction function.

Next, the processor 112 selects a reference cell in step 415. Forexample, the processor 112 may select one of the reference cells 130 a,130 b, or 130 c. Then, the processor 112 reads, in step 420, a referencevoltage stored in the selected reference cell. In step 425, theprocessor 112 updates the correction function based on the referencevoltage. For example, if a reference voltage appears to be sagging byten percent, then the processor 112 may adjust the correction functionto compensate the sag voltage in the data. In some implementations, thecorrection function will non-linearly adjust detected voltage levels.The correction function may adjust higher detected voltages levels morethan lower detected voltage levels. The correction function may adjustdetected voltages at different voltage levels by different adjustmentamounts or by different adjustment percentages.

In some implementations, thresholds may be dynamically adjusted on thefly during operation. In some implementations, the processor 112 maystore a fixed number of previous samples, such as one hundred samples,of previously read reference voltages and use a moving average of thestored reference voltages to update the correction function. Thecorrection function may also be updated based on other functions, whichmay involve mean, median, mode, or weighted averaging, for example. Forexample, a weighted moving average may be used. The processor 112 then,in step 430, determines whether to select another reference cell. As anexample, the processor 112 may determine whether there is enoughinformation to adjust the correction function. As another example, theprocessor 112 may be configured to read all the reference cells in somememory blocks as well as in some memory pages based on the read command.

If, in step 430, the processor 112 determines that there is anotherreference cell to be read, then the process 400 returns to step 415. Insome implementations, the process of adjusting the correction functionby reading the voltage in reference cells is triggered by detectederrors in data retrieved from a group of memory cells. In otherimplementations, detected errors will result in a shift of thresholdsfor determining a data value associated with a detected voltage. Thesethresholds in some implementations may be automatically shifted down,but in other implementations the thresholds are adjusted based upon thevoltage in one or more reference cells. The error may be detected by theuse of ECC 127 associated with the group of memory cells.

If the processor 112 determines in step 430 that there is no otherreference cell to be read, then the processor 112, in step 435, selectsa page to read based on the read command. Then, in step 440, theprocessor 112 reads the selected page of data from flash memory using,for example, the process 300 (FIG. 3B). In step 445, the processor 112corrects the page data using the correction function. For example, theprocessor 112 may set some parameters in the analog interface 136 toadjust the mapping function. As another example, the processor 112 mayadjust the digital representation, output from the ADC 142, using thecorrection function. Next, the processor 112 can perform error checkingoperations to check if there is any error in the page in step 450. Insome implementations, the error checking operations may be done in theECC engine 148 using hardware error detection circuits. In otherimplementations, the error checking operations may be done in software,where the processor 112 may execute an error detection code stored inthe NVM 154 to check for errors in the page. After the error checkingoperations, in step 455, the processor 112 can determine if any error isdetected.

If there is no error detected, then the processor 112 may, in step 460,transmit the read data to the host device. Then the processor 112 maydetermine whether there is another page to read in step 465. If thereare more pages to read, then the step 435 is repeated. Otherwise, theprocess 400 ends. If there are one or more errors detected in step 455,then, in step 470, the processor 112 may perform error correctionoperations, an example of which is described with reference to FIG. 5.Then the processor 112 may, in step 475, determine whether the errorcorrecting operation is successful. If the error correcting operation issuccessful, then the step 460 is repeated. If the error correctingoperation is not successful, then the processor 112 may store errorinformation (e.g., an error log) in the NVM 154 in step 480 and theprocess may continue at step 465. The error information may also bestored in a maintenance log. The stored error information may be usedfor block management operations, for which an example is described withreference to FIG. 8. In some implementations, the processor 112 willrecord the variation in sag between reference cells in a page or blockof memory cells in a maintenance log in NVM 154. In otherimplementations, the processor 112 will only record the location,physical and/or logical, of a page and/or block of memory cells in amaintenance log if the degree of sag in reference cells meets apredetermined condition. For example, if the sag in the reference cellexceeds 10% or if the difference between the degree of sag in differentreference cells exceeds 10%, the data stored in the page and/or block ofmemory cells may be refreshed by applying additional charge to thememory cells or by completely rewriting the page during a maintenanceoperation. An example of a maintenance operation is described withreference to FIG. 9.

FIG. 5 shows a flow chart that illustrates an example of a process 500for performing error correction operations to correct a page of datacontaining bit errors. The process 500 begins when, for example, theprocessor 112 detects bit errors in a page of data read from the flashmemory and sends a command to the ECC engine 148 to perform a hardwareECC algorithm to correct the bit errors in step 505. In someimplementations, the ECC engine 148 and the ADC 142, and/or the analoginterface 136 may cooperate to correct the bit errors.

Next, the ECC engine 148 may check, in step 510, whether the hardwareECC algorithm is successful. If the hardware ECC algorithm is able tocorrect all the errors in the page of data, then the hardware ECCalgorithm is successful. Then, in step 515, the ECC engine 148 storesthe ECC result in, for example, the SDRAM 151. Next, the ECC engine 148generates a message to indicate “Error correction successful” in step518 and the process 500 ends.

If the number of existing error bits exceed the number of error bitsthat the hardware ECC algorithm can correct, then the ECC engine 148sends a message to the analog interface 136 to re-read, in step 520, thepage of data from the flash memory. Next, in step 525, the ECC engine148 performs a hardware ECC algorithm again. In step 530, the ECC engine148 checks whether the hardware ECC algorithm is successful. If hardwareECC algorithm can correct, then the hardware ECC algorithm issuccessful, and the process continues with step 515.

In step 530, if the ECC engine 148 determines that the number ofexisting error bits exceed the number of error bits that the hardwareECC algorithm can correct, then the ECC engine 148 executes analternative value command to correct the bit errors. Exampleimplementations of the alternative value command are described withreference to FIGS. 6A-6C. Then, the ECC engine 148 may check whether thealternative value command corrects the bit errors in step 535. If theECC engine 148 determines that the bit errors are corrected, then theprocess continues with step 515.

If the ECC engine 148 determines that the bit errors are not corrected,then the ECC engine 148 may perform an extended software ECC algorithmin step 540 to recover the page of data. For example, the extendedsoftware ECC algorithm may include deeper ECC algorithms that use moreECC bits. For example, the hardware ECC algorithm may require four ECCbits and the extended software ECC algorithm may use 128 ECC bits. Then,the ECC engine 148 may check whether the extended software ECC algorithmis successful in step 550. If the ECC engine 148 determines that theextended software ECC algorithm is successful, then the processcontinues with step 515. If, in step 550, the extended software ECCalgorithm is not successful, then the ECC engine 148 generates, in step555, a message: “Error correction unsuccessful” and the process 500ends.

FIG. 6A shows a flow chart that illustrates an example of a process 600for generating and using alternative data values. The processor 112, theECC engine 148, the flash interface 115, or other combinations of theabove and other elements may perform the operations in the process 600.At step 605, the processor 112 retrieves information from a mask tableto identify uncertain digital data values in a data page (see, e.g.,FIG. 3, step 330) and, in some cases, to retrieve information regardinga degree of uncertainty.

Then the processor 112 may, in step 610, retrieve correction data basedon parameters (e.g., temperature, number of reads from the data page,number of writes to the data page, information in the cell resolutionregisters 166, supply voltage, charge pump voltage, the referencevoltage in the data page, etc.). For example, the processor 112 maycompute a correction function to determine the correction data for thedata page. In addition or as an alternative, the processor 112 uses thecorrection data to determine alternative digital values for eachuncertain data value in step 615. The alternative digital values foreach uncertain data value will often include the nearest adjacentdigital value and the next nearest adjacent digital value. It might alsoinclude the digital data values two digital data values away from thedigital representation of the detected analog voltage of the memorycell. Typically, not every memory cell will have an uncertain datavalue. In step 620, the processor 112 stores the identified alternativedigital values in a buffer along with stored digital data values formemory cells having certain digital data values.

After the alternative digital values are stored, the processor 112selects, in step 625, a combination of alternative digital values fromthe buffer. The combination of alternative digital values may itself beselected based on an algorithm that, for example, attempts to identifythose alternative digital values more likely to be correct. Thisselection algorithm may use data relating to a degree of uncertaintyassociated with each digital data value. Moreover, regardless of whethersuch a selection algorithm is used, the selected combination ofalternative digital values need not include all of the possiblealternative digital values. In other words, even among the data valuesidentified as being uncertain, some of the original data values may beused along with some subset of alternative data values.

Next, the processor 112 stores the page data in a buffer using theselected combination of alternative digital values in step 630 alongwith the digital data values determined with adequate certainty. Then,the processor 112 performs ECC algorithm on the stored page data in step635. For example, the processor 112 may perform the operations asdescribed in the process 500. In some cases, the execution of an ECCalgorithm may result in changes to one or more of the alternativedigital values and even to one or more of the digital data valuesdetermined with some presumption of certainty. In step 640, theprocessor 112 determines whether the ECC algorithm is successful. If theprocessor 112 determines that the ECC algorithm is successful, then, instep 645, the processor 112 stores the page data with the result of thesuccessful ECC and the process 600 ends.

In step 640, if the processor 112 determines that the ECC algorithm isnot successful, then, in step 650, the processor 112 determines whetheranother combination of alternative values is available to try. Thenumber of possible combinations of alternative values will depend uponthe number of memory cells with uncertain digital data values and thenumber of identified alternative digital values. Typically, most of thememory cells will not have uncertain digital data values. If theprocessor 112 determines another combination of alternative values isavailable to try, then the process returns to step 625.

If, in step 650, the processor 112 determines that all alternativecombinations have been tried, then the processor 112 generates an errormessage in step 655 and the process 600 ends. In some implementations,it may also be possible to generate additional alternative values and/orto adjust voltage thresholds for reading the various data values and toretry performing the ECC algorithm to identify correct values for thepage data. For example, alternative values may be identified for voltagelevels that were previously determined to represent a particular valuewith adequate certainty but that are relatively near a threshold for oneof the digital value distribution curves 205-210 (discussed above inregard to FIG. 2A). Alternatively, the voltage thresholds for thevarious digital value distribution curves 205-210 can be adjusted asdiscussed above, and the data values can be regenerated, includingidentifying new alternative values.

In some implementations, the error message in step 655 is recorded in amaintenance log in NVM 154. Then, during a maintenance operation, suchas that shown in FIG. 9, it may also be possible to generate additionalalternative values and/or to adjust voltage thresholds for reading thevarious data values and to retry performing the ECC algorithm toidentify correct values for the page data. The identified correct valuesthen may be used to rewrite the data.

FIG. 6B shows a flow chart that illustrates another example of a process660 for generating and using alternative values. The process 660 hassome steps in common with the process 600. In this example, afteridentifying uncertain data values through use of a mask table orotherwise at step 605, the processor 112 determines, in step 665, analternative value for each uncertain value using the nearest adjacentdigital value. For example, the processor 112 may use the digital valuedistribution 200 (FIG. 2A) and select a second nearest adjacent digitalvalue instead of the nearest adjacent digital value to the cell voltage.Then, the processor 112 continues the process 660 by performingoperations described in connection with FIG. 6A beginning with step 620.

FIG. 6C shows a flow chart that illustrates another example of a process670 for generating and using alternative values. In this example, theprocessor 112 does not necessarily retrieve uncertain digital valueinformation from the mask table. The process 670 begins in step 672 whenthe processor 112 receives a command to perform an alternative valueidentification and analysis on a selected page (see, e.g., FIG. 5, step535).

The processor 112 initiates, in step 674, reading of the selected page.In step 676, the processor 112 selects a cell in the page to read a cellvoltage. In step 678, the processor 112 determines whether the cellvoltage is uncertain. For example, the processor 112 may use the digitalvalue distribution 200 as shown in FIG. 2A to determine whether thereceived cell voltage is in one of the grey areas 220. If the processor112 determines that the cell voltage is in the grey area, then theprocessor 112 determines a digital data value of the cell using a secondclosest digital data value in step 680. In other implementations, theprocessor 112 determines a digital data value of the cell using thefirst closest digital data value. Next, the processor 112 stores, instep 682, the digital data values in a buffer.

If, in step 678, the processor 112 determines that the cell voltage isnot in the grey area, then the processor 112 determines a digital datavalue of the cell based on stored thresholds in step 684 and theprocessor 112 performs the step 682. After the step 682, in step 686,the processor 112 determines whether to read another cell in the page.If the processor 112 determines to read another cell, then the processreturns to step 676. If the processor 112 determines that there are nofurther cells to read, then the process 670 ends.

FIG. 7A shows a flow chart that illustrates an example of a process 700for writing data to the flash memory page 121 using the reference cells130 a, 130 b, 130 c. The process 700 may be generally performed by theprocessor 112. The process 700 begins in step 705 when the processor 112receives a write command. For example, the write command may include awrite instruction, data to be written, and a memory address that thedata is going to be written to, which may be received, for example, as alogical block address from the host. Then, based on the write command,the processor 112 selects a memory page in the flash memory in step 710.

Next, the processor 112 may copy, in step 715, the data to be written toa buffer, such as the SDRAM 151. The data may either be transferred froman external host device or from another memory page. In someimplementations, the data stored on the selected memory page is copiedinto the buffer for recopying back into the selected page. In otherimplementations, the data to be written to a selected memory page is notcopied into the buffer, but rather written directly from the data source(either from an external host device or from other memory cells) to theselected memory page.

Then, the processor 112 erases, in step 725, any data stored in theselected page. In step 730, the processor 112 writes the data from thebuffer to the selected memory page by, for example, applying charges tothe data cells 124 and the reference cell 130 c. Step 730 appliesdifferent amounts of charge to the memory cells depending on the desireddata value and corresponding analog voltage level for each cell. In someimplementations, a charge pump may be used to apply charges to memorycells in the selected memory page. Then, the processor 112 reads areference voltage in the reference cell 130 c of the selected page instep 735. The reference voltage is read by detecting a voltage level inthe reference cell 130 c. The processor 112 checks, in step 740, whetherthe reference voltage is less than a target voltage. If the processor112 determines that the reference voltage is less than the targetvoltage, then the process returns to step 730 to apply additional chargeand increase the voltage stored in the cells in the selected memorypage. The amount of applied additional charge may be scaled dependingupon how the desired voltage level compares percentage-wise to thevoltage of the reference cell(s) (e.g., if the detected reference cellvoltage is 10% lower than targeted and a particular memory cell shouldhave a voltage level double that of the reference cell, then the amountof additional charge applied to the particular memory cell may be twicethat applied to the reference cell).

In step 740, if the processor 112 determines that the reference voltageis not less than the target voltage, then the processor 112, in step745, selects a data cell and reads voltage of the selected data cell instep 750. Then, in step 755, the processor 112 determines whether theread voltage is too high. For example, the processor 112 may compare theread cell voltage to the digital value distribution and check whetherthe cell voltage lies within a voltage range of the targeted digitalvalue. If the processor 112 determines that the voltage is not too high,then the processor determines, in step 760, whether to select anotherdata cell. If the processor 112 determines that it is not necessary toselect another data cell, then the process 700 ends. Otherwise, theprocess 700 returns to step 745 to test an additional data cell.

In some implementations, it may also be possible to test the data cellsselected at step 745 to determine if they are too low. If so, theprocess 700 may return to step 730 to apply additional charge to one ormore of the data cells. In some implementations, once the testing of oneor more reference cells at step 740 is complete, the voltage level ofall data cells may be selected at step 745 (or in iterative repetitionsof step 745) to determine if the levels are too high and/or too low. Inthis manner, the reference cells may be used to perform an initialcharging of the page or block, followed by testing and possible tweakingof voltage levels in the cells. Furthermore, in some implementations,the target voltages for reference cells used at step 740 may be set alittle lower than the threshold voltage for a desired data value toattempt to avoid overcharging, followed by checking actual data cellvalues and tweaking the voltage levels to reach voltage levelscorresponding to the desired data values for the actual data cell

If, in step 755, the processor 112 determines that the voltage is toohigh, then the processor 112 determines whether it is necessary torewrite the selected page. For example, the processor 112 may comparethe number of bit errors to a threshold that is less than or equal tothe number of correctable errors using one of the correction algorithmsdescribed with reference to FIG. 5. If the number of bit errors isgreater than the threshold, then the selected page is re-written.Otherwise, the processor 112 may determine that a rewrite of theselected page is not required. In step 765, if the processor 112determines that rewrite of the page is not required, then the process700 continues with step 760. If the processor 112 determines thatrewrite of the page is required in step 765, then the process 700returns to step 725 to reinitiate writing of the memory page. In someimplementations, the target voltage may be decreased incrementally afterstep 765 to reduce the likelihood of overshooting the target voltage.

FIG. 7B shows a flow chart illustrating an example of a process 770 thatachieves a higher data transfer rate between a host device and the MCP100. The process 770 begins in step 772 when the processor 112 receivesa write command from a host device. For example, the write command froma host device may include a write instruction, data to be written, and amemory address that the data is going to be written to, which may bereceived, for example, as a logical block address from the host.

Next, the processor 112 determines whether to proceed to a quick writeprocess (e.g., writing at a single level cell resolution or otherrelatively low resolution) or to use a more time, power, and processorintensive writing process of writing at a higher resolution. In step774, the processor 112 determines if there is a command from a hostinterface to perform a quick write. In some implementations, a hostdevice may also specify the resolution of the quick write. If a hostdevice does not specify a quick write, then the processor 112 mayindependently determine if a whether a quick write is warranted. Step776 then determines if the MCP 100 or the host device connected to theMCP 100 meets a predetermined power supply conditions. In the shownimplementation, step 776 determines whether the host device is suppliedwith AC power. In other implementations, step 776 instead determines ifa battery supplying power to the host device is charged to apredetermined charge. In some implementations, step 776 will determinewhether a battery supplying charge to the host device is charged tomaximum capacity or at least 90% of capacity. Step 778 then determineswhether the processor 112 has excess bandwidth meeting a predeterminedbandwidth condition. In some implementations, step 778 is satisfied ifthe processor 112 is otherwise idle. In other implementations, step 778is satisfied if a predetermined percentage of bandwidth of the processor112 be unused. If both 776 and 778 are satisfied, then the process usesprocess 700 to write to memory cells at a high resolution, step 780. Ifone or both of conditions 776 and 778 are unsatisfied, then the processproceeds to a quick write procedure.

In a quick write procedure, the processor 112 in step 782, selects oneor more available memory cell pages to write data from the host deviceto. In some implementations, the processor may copy data from the hostdevice into a buffer, such as the SDRAM 151. In other implementations,data from the host device is not copied into the buffer, but ratherwritten directly to the selected memory page in step 786 after steps 725and 784. In step 725, the processor erases any data stored in theselected page(s). In step 774, the processor 112 updates any cellresolution registers associated with the selected memory page(s) to alow resolution. In some implementations, the low resolution will be aresolution of one bit per memory cell. In other implementations, the lowresolution will be 2, 3, or 4 bits per cell. Writing at a lowerresolution when copying data from a host device to the MCP 100 increasesthe data transfer rate because less precision is needed when chargingeach memory cell and, thus, the degree of care and the amount of voltageadjustments needed when writing to the memory cells can be reduced.After writing the data to the memory cell(s) at a low resolution, step784 will record a maintenance log entry indicating that the data storedin the selected memory page should be rewritten at a higher resolutionduring a maintenance process (process 900).

FIG. 8A shows a flow chart illustrating an example of a process 800 foradjusting a cell resolution of a memory page. The process 800 mayperform the operations in the process 800 when, for example, theprocessor 112 executes a maintenance program to update the cellresolution registers 166. The process 800 begins in step 805 when theprocessor 112 reads stored error information in step 805. The errorinformation may be stored during read errors or write errors, forexample, as described at step 480 in FIG. 4. Next, the processor 112selects a page in step 810. In step 815, the processor 112 determineswhether the error count of the selected page is greater than athreshold. If the error count of the selected page is not greater thanthe threshold, then the processor 112 checks whether there are morepages to check in step 820. If the processor 112 determines that thereare no more pages to check, then the process 800 ends. If, in step 820,the processor 112 determines that there are more pages to check, thenthe process returns to step 810. In some implementations, the processor112 may check all the memory pages with errors. In otherimplementations, the processor 112 may only check memory pages with newerrors recorded in the error information.

In step 815, if the error count of the selected page is greater than thethreshold, then the processor 112 copies a page of data from theselected page into a buffer in step 825. Next, the processor 112 updatesthe cell resolution registers 166 to reduce the cell resolution of theselected page. For example, the flash interface 115 may check the cellresolution registers 166 to find that the cell resolution is reduced andthe flash interface 115 may then read and write to the selected pageusing the new reduced cell resolution.

Then, the processor 112 can assign physical addresses for the copieddata in step 835. Depending on available memory pages, the processor 112may assign one, two, four, or other number of physical memory pages tostore the copied data. Next, the processor 112 updates in step 840 alogical address table to correspond to the assigned physical addresses.The logical address table may be used to map a logical page to one ormore physical pages. An example use of the logical address table duringa memory access operation is described with reference to FIG. 10. Instep 845, the processor 112 moves the copied data from the buffer to thepages at the assigned physical addresses. Next, the processor 112determines whether there are more pages to check in step 820. If so, theprocess 800 returns to step 810. Otherwise, the process 800 ends.

FIG. 8B depicts a similar process to that in FIG. 8A that is focused ondowngrading groups of pages or blocks of memory cells and logicallytreating the group as a single page or block of memory cells having theoriginal resolution. In FIG. 8B the process 860 also reads stored errorinformation 805, selects a page 810, and determines whether an errorcount associated with the page is in excess of a threshold 815. If theerror count associated with the page is in excess of a threshold, thenthe data stored in the page is copied to a buffer 825 and the cellresolution register(s) associated with the page are updated to reducethe resolution of the page 830. In the implementation depicted in FIG.8B, however, a processor also selects another page of data having areduced cell resolution 855 and updates the block management code and/orthe logical addressing code to pair the two pages together. The twopages having reduced cell resolution are then logically treated as asingle page with the higher original resolution. This process may grouptogether more than two pages of memory cells.

In some implementations, this process will downgrade entire blocks ofmemory cells and pair or otherwise associate them. In someimplementations, each paired page will have the same downwardly adjustedcell resolution and include the same number of memory cells. Forexample, a page of memory cells downgraded from each memory cell storing8 bits of data to each memory cell storing 4 bits of data is groupedwith another page of memory cells with each memory cell storing 4 bitsof data. The combination of these two pages of memory cells is thenlogically treated by the flash disk controller as a single page (or as asingle block) storing 8 bits of data per memory cell. These paired pagesof memory cells need not be on the same block and could possibly be ondifferent flash memory dies. The process 860 next performs step 820 ofdetermining whether there are more memory pages to check and proceeds inthe same manner as described in FIG. 8A.

FIG. 9 is a flow chart that illustrates a maintenance process 900. Onepossible function for maintenance process 900 is for rewriting, at arelatively high resolution, data stored in a flash memory at arelatively low resolution (e.g., see FIG. 7B). The maintenance processcan be used, for example, to maximize the battery life of a host devicewhile also maximizing data storage capacity. In some implementations,maintenance process 900 is triggered by the processor as part of aroutinely scheduled maintenance operation. In some implementations,maintenance process 900 is triggered by a signal from a host devicesignaling that the host device is supplied with AC power. In otherimplementations, other conditions may cause a host device or theprocessor 112 to trigger the maintenance process 900, such as, an idleprocessor 112.

Process 900 begins with step 905, which may determine whether the MCP100 is operating under a predetermined power condition. In someimplementations, this power condition is met by a host device receivingAC power. In some implementations, this power condition is met by a hostdevice battery meeting a predetermined amount of charge, for example,the battery being fully charged. A fully charged battery may indicatethat a host device is being supplied with AC power. If the MCP 100 doesnot meet the predetermined power condition, process 900 ends.

Next, in step 910, the processor 112 may determine whether the processor112 has sufficient bandwidth to fully perform the maintenance process900. In some implementations, the maintenance operation merely runs as abackground process which requires minimal bandwidth. In someimplementations, the maintenance operation requires an idle processor112. In other implementations, process 900 does not determine whetherthe processor 112 has sufficient bandwidth. In some implementations, thebandwidth requirement changes based upon the need for the maintenanceoperations, which may be measured by the time between successfulmaintenance processes or by the amount of available space on the flashmemory. If the processor 112 does not have sufficient bandwidth, process900 ends.

If the predetermined power condition is met and the processor 112 hassufficient bandwidth, process 900 then may read stored maintenance logs,step 915. In some implementations, the stored maintenance logs arestored in NVM 154. In some implementations, stored maintenance logsindicate the priority of possible maintenance operations. In someimplementations, the stored maintenance logs are used to determinewhether any maintenance steps (such as steps 920, 925, 930 & 935) can beperformed in a simplified operation. For example, maintenance logs mayindicate the need to both downgrade a particular page of memory cellsand to rewrite the data on the same page of memory cells. In otherimplementations, the maintenance operations are a predetermined sequenceof, for example, rewriting transferred data at a higher resolution (step920); downwardly adjusting cell resolutions and pairing groups of pages,e.g., by performing processes 800 and 850 (step 925); rewriting datathat meet a predetermined error condition (e.g., using process 700)(step 930); swapping the most frequently accessed data with the leastfrequently used data using the wear management software code 157 (step935); updating the logical addressing software code 163 for eachmaintenance operation that moved data from one physical location toanother physical location (e.g., using process 1000), (step 940); andrefreshing pages of data that exceed a threshold amount of voltage sagby applying additional charge to the page of memory cells (step 945).Other sequences including some, all, or additional operations may alsobe used. In some implementations, the process 900 repeats step 905and/or step 910 between each maintenance step 920, 925, 930, 935, or945, and may end if either of condition 905 or 910 change. Process 900then ends.

FIG. 10 is a flow chart that illustrates an example of a process 1000 oflogical addressing in the FDC 106. For example, the FDC 106 may map areceived read or write command with a logical address to one or morephysical pages. In some implementations, the FDC 106 may dynamically mapa logical page to one or more variable physical page(s). For example,the FDC 106 may change the mapping to balance the load of a physicalmemory page. In some implementations, the mapping between logical pagesand physical pages may be stored in a logical address table. In someimplementations, the process 1000 may be performed by the processor 112when the processor 112 is executing the logical addressing code 163. Theprocess 1000 begins when the FDC receives a command from the host devicethat a memory page is to be accessed (e.g., read, written to, orerased). Then, in step 1005, the processor 112 receives a logical pageaddress to access a page in the flash memory.

Next, the processor 112 determines, in step 1010, one or more physicalpage addresses associated with the received logical address. In oneexample, the received logical page address may be associated to only onephysical page address. In another example, the received logical pageaddress may be associated with two or more physical pages because thephysical pages have a lower cell resolution than normal, or the physicalpages are not contiguous in the flash memory, or they are in differentblocks or on different dies.

Then the processor 112 selects a first of the determined physical pageaddresses in step 1015. In step 1020, the processor 112 reads the pagedata at the selected physical address. The processor 112 then stores, instep 1025, the page data in the host output buffer. In step 1030, theprocessor 112 determines whether it is necessary to access anothermemory page. For example, if there is more than one physical pageaddresses associated with the logical page address, then the processor112 may access another memory page. If, in step 1030, the processor 112determines that it is necessary to access another memory page, then theprocessor, in step 1035, selects a next determined physical page addressand the process returns to step 1020. Otherwise, the process 1000 ends.

FIG. 11 shows an example system 1100 that includes multiple NAND flashmemory dies 103 and the FDC 106. The FDC 106 includes a multiplexer(MUX) 1105 in the analog interface 115 and a charge pump 1110. Althoughthe system 1100 is shown using NAND flash memory dies 103, some of thetechniques used in the system 1100 may also be applicable to NOR flashmemory dies, or a combination of NAND and NOR dies. The system 1100 maybe implemented using discrete ICs, or it may be partially or fullyintegrated in a single package.

The FDC 106 receives analog data from the NAND flash memory dies 103through the analog interface 115. In this example, the MUX 1105 receivesmultiple analog inputs. In some implementations, the MUX 1105 receivesthe multiple analog inputs from multiple flash memory dies 103. Theanalog interface 115 can control the MUX 1105 to select one analog inputto be transmitted to the ADC 142. For example, the analog interface 115may control the MUX 1105 based on a received read command. During awrite operation, the FDC 106 uses the charge pump 1110 to apply chargesto the memory cells in one of the NAND flash memory dies 103. In someimplementations, the charge pump 1110 is adapted to supply charge tomemory cells on a plurality of flash memory dies 103. For example, theFDC 106 may send a control signal to select a designated memory die toreceive charges from the charge pump 1110. Then, when the charge pump1110 applies charges, the selected memory die receives the charges.

By sharing the ADC 1105 and the charge pump 1110 between multiple dies103, the storage size of the memory dies 103 may be increased.Additionally, the flash memory dies 103 may be manufactured with a lowercost without the ADC 142 and the charge pump 1110. In someimplementations, the charge pump 1110 may be integrated on a die withthe FDC 106 or separately mounted on a different die or on a differentsubstrate, such as a printed circuit board.

In order to facilitate the use of an ADC 1105 and a charge pump 1110adapted to be used with multiple flash memory dies 103, some flashmemory dies 103 may include an input adapted to receive a programmingcharge from an external supply node. The flash memory dies 103 are thennot required to include any additional circuitry to alter or regulatethe supplied programming charge. The flash memory dies 103 may alsoinclude an output adapted to send an analog voltage signal to a flashdisk controller 106.

In some implementations, the FDC 106 may also include a charge pumpinterleaving method to write data to the memory dies 103.

FIG. 12 shows an example system 1200 illustrating an architecture toseparately provide programming and logic-level power to the NAND flashmemory die 103. The system 1200 includes the charge pump 1110 and a lowdropout regulator (LDO) 1205 that receive electrical power from a powersupply 1210.

As shown, the NAND flash memory die 103 includes two power inputs. Apower input for charge pump voltage (V_(cp)) and a power input for logicvoltage (V_(logic)). In some examples, the V_(cp) may be substantiallyhigher than the V_(logic). For example, the V_(cp) may be approximately12-20 V or approximately 12-30 V and the V_(logic) maybe approximately1-3 V. In some implementations, the regulation and current requirementsfor the V_(cp) may be substantially different from those for theV_(logic).

As an example, the NAND flash memory die 103 may require that theV_(logic) to have a tightly regulated (e.g., 0.5%, 1.0%, 5%) voltagetolerance at a low logic voltage to minimize power consumption,switching times, etc. Furthermore, the logic voltage may call for highfrequency bypass capacitance at a low voltage level. In contrast, thecharge pump supply regulation requirements may be between about 5% and10%, with a need for substantially low frequency, higher voltagecapacitance.

In order to facilitate the system of FIG. 12, the flash memory die 103may include a first interface for receiving power for selectivelyprogramming each flash memory cell, and a second interface for receivingpower supplied to logic level circuitry to perform the selection offlash memory cells to be supplied with power from the first input duringa write operation. The flash disk controller 106 may comprise a firstpower source for supplying power to the first interface at a programmingvoltage and a second power source for supplying logic-level power to thesecond interface. The first and second power sources may be external tothe flash memory die 103.

Although various implementations of processes and techniques have beendescribed, other implementations may perform the steps in differentsequence, or a modified arrangement to achieve the same primaryfunction. In addition, although operations in the various processes aresometimes described as being performed by a particular device orcomponent, such devices or components are merely examples, and theoperations can be performed using alternative devices or components insome implementation

In some examples, the NAND flash memory die 103 may also have anypractical number of bits of resolution, such as, for example, 6, 7, 10,12 bits of resolution. Various implementations may be used to performECC operations with flash memory that may include NAND flash memory, NORflash memory, or a combination of these or other non-volatile memories.Flash memory die of one or more types may be stacked and/or mountedadjacent each other in the MCP 100. Those of ordinary skill in the artwill recognize that some examples of techniques described herein may beapplied to particular advantage with NAND flash technology, and somemethods described herein may be generally applicable to non-volatilememories such as NAND and/or NOR flash.

Although an example of a system, which may be portable, has beendescribed with reference to the above figures, other implementations maybe deployed in other processing applications, such as desktop andnetworked installations.

Although particular features of an architecture have been described,other features may be incorporated to improve performance. For example,caching (e.g., L1, L2, etc. . . . ) techniques may be used in the FDC106. Random access memory may be included, for example, to providescratch pad memory and or to load executable code or parameterinformation stored in the flash memory for use during runtimeoperations. Other hardware and software may be provided to performoperations, such as network or other communications using one or moreprotocols, wireless (e.g., infrared) communications, stored operationalenergy and power supplies (e.g., batteries), switching and/or linearpower supply circuits, software maintenance (e.g., self-test, upgrades,etc. . . . ), and the like. One or more communication interfaces may beprovided in support of data storage and related operations.

In some implementations, one or a combination of methods may be used toimprove data integrity. For example, cell voltage errors may beaddressed by adjusting thresholds and/or rewriting cells at least once.Cell re-writing may be performed in response to deviations from idealcell voltage and/or as a background activity. For example, multi-levelcell voltages may be rewritten to refresh the voltage in one or morelossy cells in a page. For cells that have been characterized as tendingto lose voltage over time, the voltage level to which such cells arecharged may be boosted to near an upper threshold of each cell's rangeto compensate for anticipated loss of charge in those cells over time.The boosted voltage level may initially be near or above the upperthreshold of the intended range, which may be in a gray zone betweenranges. Based on estimated or determined loss rates, the data may bere-written frequently enough to substantially maintain the cell voltageswithin a desired range. Similar compensation may be used to compensatefor cells characterized as having an upward drift. Such rewritingprocedures may be performed, for example, as a low priority backgroundprocess that is executed as resources are available. For data identifiedas high value data, rewriting may be scheduled to occur frequentlyenough to maintain the cell voltages within a desired range, thefrequency being based on an expected voltage drift rate and the size ofthe voltage range associated with each bit level. In someimplementations, rewriting may be configured to be performed morefrequently when a portable device is coupled to an external powersource, such as a power source derived from the electric utility grid.Rewriting operations may be performed in response to being coupled tosuch a power source. In addition, rewriting may be configured to beperformed less frequently under certain conditions, such as, forexample, while in a power conservation mode, during a low batterycondition, or when storing short duration or non-critical data (e.g.,streaming audio/video).

Some systems may be implemented as a computer system that can be usedwith implementations of the invention. For example, variousimplementations may include digital and/or analog circuitry, computerhardware, firmware, software, or combinations thereof. Apparatus can beimplemented in a computer program product tangibly embodied in aninformation carrier, e.g., in a machine-readable storage device or in apropagated signal, for execution by a programmable processor; andmethods can be performed by a programmable processor executing a programof instructions to perform functions of the invention by operating oninput data and generating an output. The invention can be implementedadvantageously in one or more computer programs that are executable on aprogrammable system including at least one programmable processorcoupled to receive data and instructions from, and to transmit data andinstructions to, a data storage system, at least one input device,and/or at least one output device. A computer program is a set ofinstructions that can be used, directly or indirectly, in a computer toperform a certain activity or bring about a certain result. A computerprogram can be written in any form of programming language, includingcompiled or interpreted languages, and it can be deployed in any form,including as a stand-alone program or as a module, component,subroutine, or other unit suitable for use in a computing environment.

Suitable processors for the execution of a program of instructionsinclude, by way of example, both general and special purposemicroprocessors, which may include a single processor or one of multipleprocessors of any kind of computer. Generally, a processor will receiveinstructions and data from a read-only memory or a random access memoryor both. The essential elements of a computer are a processor forexecuting instructions and one or more memories for storing instructionsand data. Generally, a computer will also include, or be operativelycoupled to communicate with, one or more mass storage devices forstoring data files; such devices include magnetic disks, such asinternal hard disks and removable disks; magneto-optical disks; andoptical disks. Storage devices suitable for tangibly embodying computerprogram instructions and data include all forms of non-volatile memory,including, by way of example, semiconductor memory devices, such asEPROM, EEPROM, and flash memory devices; magnetic disks, such asinternal hard disks and removable disks; magneto-optical disks; and,CD-ROM and DVD-ROM disks. The processor and the memory can besupplemented by, or incorporated in, ASICs (application-specificintegrated circuits).

In some implementations, each system 100 may be programmed with the sameor similar information and/or initialized with substantially identicalinformation stored in volatile and/or non-volatile memory. For example,one data interface may be configured to perform auto configuration, autodownload, and/or auto update functions when coupled to an appropriatehost device, such as a desktop computer or a server.

In some implementations, one or more user-interface features may becustom configured to perform specific functions. The invention may beimplemented in a computer system that includes a graphical userinterface and/or an Internet browser. To provide for interaction with auser, some implementations may be implemented on a computer having adisplay device, such as a CRT (cathode ray tube) or LCD (liquid crystaldisplay) monitor for displaying information to the user, a keyboard, anda pointing device, such as a mouse or a trackball by which the user canprovide input to the computer.

In various implementations, the system 100 may communicate usingsuitable communication methods, equipment, and techniques. For example,the system 100 may communicate with compatible devices (e.g., devicescapable of transferring data to and/or from the system 100) usingpoint-to-point communication in which a message is transported directlyfrom the source to the receiver over a dedicated physical link (e.g.,fiber optic link, point-to-point wiring, daisy-chain). The components ofthe system may exchange information by any form or medium of analog ordigital data communication, including packet-based messages on acommunication network. Examples of communication networks include, e.g.,a LAN (local area network), a WAN (wide area network), MAN (metropolitanarea network), wireless and/or optical networks, and the computers andnetworks forming the Internet. Other implementations may transportmessages by broadcasting to all or substantially all devices that arecoupled together by a communication network, for example, by usingomni-directional radio frequency (RF) signals. Still otherimplementations may transport messages characterized by highdirectivity, such as RF signals transmitted using directional (i.e.,narrow beam) antennas or infrared signals that may optionally be usedwith focusing optics. Still other implementations are possible usingappropriate interfaces and protocols such as, by way of example and notintended to be limiting, USB 2.0, Firewire, ATA/IDE, RS-232, RS-422,RS-485, 802.11 a/b/g, Wi-Fi, Ethernet, IrDA, FDDI (fiber distributeddata interface), token-ring networks, or multiplexing techniques basedon frequency, time, or code division. Some implementations mayoptionally incorporate features such as error checking and correction(ECC) for data integrity, or security measures, such as encryption(e.g., WEP) and password protection.

A number of implementations of the invention have been described.Nevertheless, it will be understood that various modifications may bemade without departing from the spirit and scope of the invention. Forexample, advantageous results may be achieved if the steps of thedisclosed techniques were performed in a different sequence, ifcomponents in the disclosed systems were combined in a different manner,or if the components were replaced or supplemented by other components.The functions and processes (including algorithms) may be performed inhardware, software, or a combination thereof, and some implementationsmay be performed on modules or hardware not identical to thosedescribed.

1. A method for charging a memory cell comprising: applying charge to afirst reference memory cell until a voltage level in the first referencememory cell reaches a first reference target voltage level; determiningthat a second target voltage level is greater than the first referencetarget voltage level, the second target voltage level corresponding to asecond memory cell; detecting the voltage level in the first referencememory cell; applying charge to the second memory cell using thedetected voltage level in the first reference memory cell; and applyingadditional charge to the second memory cell until a voltage level in thesecond memory cell reaches the second target voltage level.
 2. Themethod of claim 1, wherein the voltage level for each the firstreference memory cell and the second memory cell corresponds to a datavalue comprising more than one bit.
 3. The method of claim 2, wherein afirst data value corresponding to the first reference memory cell and asecond data value corresponding to the second memory cell comprise asame number of bits.
 4. The method of claim 3, wherein determining thatthe second target voltage level is greater than the first referencetarget voltage level comprises determining that the second data value isgreater than the first data value.
 5. The method of claim 1, wherein thefirst reference memory cell and the second memory cell are containedwithin a page of memory cells.
 6. The method of claim 1, wherein thefirst reference memory cell and the second memory cell are containedwithin a block of memory cells, the block of memory cells comprising aplurality of pages of memory cells, wherein the first reference memorycell is segregated from the pages of memory cells and the second memorycell is contained in the pages of memory cells.
 7. The method of claim1, wherein the first reference memory cell and the second memory cellcomprise NAND flash memory cells.
 8. The method of claim 1, wherein anamount of the additional charge applied to the second memory cell isscaled based upon a difference between the first reference targetvoltage level and the second target voltage level.
 9. The method ofclaim 1, wherein applying charge to the second memory cell using thedetected voltage level in the first reference memory cell comprises:selecting a charge to apply to the second memory cell based upon thedetected voltage level in the first reference memory cell and the secondtarget voltage level for the second memory cell; and applying theselected charge to the second memory cell.
 10. An article of manufacturecomprising a storage device storing instructions that, when executed,cause a data processing apparatus to: apply charge to a first referencememory cell until a voltage level in the first reference memory cellreaches a first reference target voltage level; determine that a secondtarget voltage level is greater than the first reference target voltagelevel, the second target voltage level corresponding to a second memorycell; detect the voltage level in the first reference memory cell; applycharge to the second memory cell using the detected voltage level in thefirst reference memory cell; and apply additional charge to the secondmemory cell until a voltage level in the second memory cell reaches thesecond target voltage level.
 11. The article of manufacture of claim 10,wherein the voltage level for each the first reference memory cell andthe second memory cell corresponds to a data value comprising more thanone bit.
 12. The article of manufacture of claim 11, wherein a firstdata value corresponding to the first reference memory cell and a seconddata value corresponding to the second memory cell comprise a samenumber of bits.
 13. The article of manufacture of claim 12, wherein theinstructions that cause the data processing apparatus to determine thatthe second target voltage level is greater than the first referencetarget voltage level comprise instructions that cause the dataprocessing apparatus to determine that the second data value is greaterthan the first data value.
 14. The article of manufacture of claim 10,wherein the first reference memory cell and the second memory cell arecontained within a page of memory cells.
 15. The article of manufactureof claim 10, wherein the first reference memory cell and the secondmemory cell are contained within a block of memory cells, the block ofmemory cells comprising a plurality of pages of memory cells, whereinthe first reference memory cell is segregated from the pages of memorycells and the second memory cell is contained in the pages of memorycells.
 16. The article of manufacture of claim 10, wherein the firstreference memory cell and the second memory cell comprise NAND flashmemory cells.
 17. A system for writing data to a memory device, thesystem comprising: a plurality of memory cells, the plurality of memorycells comprising at least a first reference memory cell and a secondmemory cell; a power source to apply charge to the first referencememory cell and the second memory cell; a cell reader to detect avoltage level from the first reference memory cell and the second memorycell; and a controller to control application of charge from the powersource to the first reference memory cell until a voltage level in thefirst reference memory cell reaches a first reference target voltagelevel, and to control application of charge from the power source to thesecond memory cell using the voltage level detected from the firstreference memory cell; wherein the second memory cell corresponds to asecond target voltage level, the second target voltage level beinggreater than the first reference target voltage level; wherein thecontroller is further configured to control application of additionalcharge to the second memory cell until a voltage level in the secondmemory cell reaches the second target voltage level.
 18. The system ofclaim 17, wherein the plurality of memory cells comprise NAND flashmemory cells.
 19. The system of claim 17, further comprising: a detectorto detect voltage levels in the plurality of memory cells; and aprocessor to determine data values for each memory cell based upon thedetected voltage level and determine the success of a write operation,the detected voltage level for each memory cell corresponding to a datavalue comprising more than one bit.
 20. The system of claim 19, furthercomprising: an analog-to-digital converter to convert detected voltagelevels into digital representations of voltage levels; wherein theprocessor uses the digital representation to determine data values foreach memory cell.